package com.iot.http2.service.impl;

import com.iot.http2.service.InnerService2;
import com.iot.http2.vo.DemoDTO;
import com.iot.http2.vo.DemoVO;
import org.springframework.stereotype.Service;

/**
 * 演示被InnerService依赖调用
 * @author guoguoqiang
 * @since 20201209
 */
@Service
public class InnerService2Impl implements InnerService2 {
    @Override
    public DemoVO inner2(DemoDTO dto) {
        if (dto == null) {
            return null;
        }
        return DemoVO.builder()
                .id("1234")
                .name(dto.getName())
                .address(dto.getAddress())
                .build();
    }
}
